{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 导入数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>V0</th>\n",
       "      <th>V1</th>\n",
       "      <th>V2</th>\n",
       "      <th>V3</th>\n",
       "      <th>V4</th>\n",
       "      <th>V5</th>\n",
       "      <th>V6</th>\n",
       "      <th>V7</th>\n",
       "      <th>V8</th>\n",
       "      <th>V9</th>\n",
       "      <th>...</th>\n",
       "      <th>V29</th>\n",
       "      <th>V30</th>\n",
       "      <th>V31</th>\n",
       "      <th>V32</th>\n",
       "      <th>V33</th>\n",
       "      <th>V34</th>\n",
       "      <th>V35</th>\n",
       "      <th>V36</th>\n",
       "      <th>V37</th>\n",
       "      <th>target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.566</td>\n",
       "      <td>0.016</td>\n",
       "      <td>-0.143</td>\n",
       "      <td>0.407</td>\n",
       "      <td>0.452</td>\n",
       "      <td>-0.901</td>\n",
       "      <td>-1.812</td>\n",
       "      <td>-2.360</td>\n",
       "      <td>-0.436</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.136</td>\n",
       "      <td>0.109</td>\n",
       "      <td>-0.615</td>\n",
       "      <td>0.327</td>\n",
       "      <td>-4.627</td>\n",
       "      <td>-4.789</td>\n",
       "      <td>-5.101</td>\n",
       "      <td>-2.608</td>\n",
       "      <td>-3.508</td>\n",
       "      <td>0.175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.968</td>\n",
       "      <td>0.437</td>\n",
       "      <td>0.066</td>\n",
       "      <td>0.566</td>\n",
       "      <td>0.194</td>\n",
       "      <td>-0.893</td>\n",
       "      <td>-1.566</td>\n",
       "      <td>-2.360</td>\n",
       "      <td>0.332</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.128</td>\n",
       "      <td>0.124</td>\n",
       "      <td>0.032</td>\n",
       "      <td>0.600</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>0.160</td>\n",
       "      <td>0.364</td>\n",
       "      <td>-0.335</td>\n",
       "      <td>-0.730</td>\n",
       "      <td>0.676</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.013</td>\n",
       "      <td>0.568</td>\n",
       "      <td>0.235</td>\n",
       "      <td>0.370</td>\n",
       "      <td>0.112</td>\n",
       "      <td>-0.797</td>\n",
       "      <td>-1.367</td>\n",
       "      <td>-2.360</td>\n",
       "      <td>0.396</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.009</td>\n",
       "      <td>0.361</td>\n",
       "      <td>0.277</td>\n",
       "      <td>-0.116</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>0.160</td>\n",
       "      <td>0.364</td>\n",
       "      <td>0.765</td>\n",
       "      <td>-0.589</td>\n",
       "      <td>0.633</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.733</td>\n",
       "      <td>0.368</td>\n",
       "      <td>0.283</td>\n",
       "      <td>0.165</td>\n",
       "      <td>0.599</td>\n",
       "      <td>-0.679</td>\n",
       "      <td>-1.200</td>\n",
       "      <td>-2.086</td>\n",
       "      <td>0.403</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.015</td>\n",
       "      <td>0.417</td>\n",
       "      <td>0.279</td>\n",
       "      <td>0.603</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-0.065</td>\n",
       "      <td>0.364</td>\n",
       "      <td>0.333</td>\n",
       "      <td>-0.112</td>\n",
       "      <td>0.206</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.684</td>\n",
       "      <td>0.638</td>\n",
       "      <td>0.260</td>\n",
       "      <td>0.209</td>\n",
       "      <td>0.337</td>\n",
       "      <td>-0.454</td>\n",
       "      <td>-1.073</td>\n",
       "      <td>-2.086</td>\n",
       "      <td>0.314</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.183</td>\n",
       "      <td>1.078</td>\n",
       "      <td>0.328</td>\n",
       "      <td>0.418</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-0.215</td>\n",
       "      <td>0.364</td>\n",
       "      <td>-0.280</td>\n",
       "      <td>-0.028</td>\n",
       "      <td>0.384</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.445</td>\n",
       "      <td>0.627</td>\n",
       "      <td>0.408</td>\n",
       "      <td>0.220</td>\n",
       "      <td>0.458</td>\n",
       "      <td>-1.056</td>\n",
       "      <td>-1.009</td>\n",
       "      <td>-1.896</td>\n",
       "      <td>0.481</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.454</td>\n",
       "      <td>0.674</td>\n",
       "      <td>0.358</td>\n",
       "      <td>0.618</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>0.364</td>\n",
       "      <td>-0.191</td>\n",
       "      <td>-0.883</td>\n",
       "      <td>0.060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.889</td>\n",
       "      <td>0.416</td>\n",
       "      <td>0.640</td>\n",
       "      <td>0.356</td>\n",
       "      <td>0.224</td>\n",
       "      <td>-0.893</td>\n",
       "      <td>-0.812</td>\n",
       "      <td>-1.823</td>\n",
       "      <td>0.729</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.454</td>\n",
       "      <td>0.081</td>\n",
       "      <td>0.243</td>\n",
       "      <td>0.468</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>0.364</td>\n",
       "      <td>-0.155</td>\n",
       "      <td>-1.318</td>\n",
       "      <td>0.415</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.984</td>\n",
       "      <td>0.529</td>\n",
       "      <td>0.704</td>\n",
       "      <td>0.438</td>\n",
       "      <td>0.258</td>\n",
       "      <td>-0.917</td>\n",
       "      <td>-0.682</td>\n",
       "      <td>-1.721</td>\n",
       "      <td>0.753</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.139</td>\n",
       "      <td>-0.050</td>\n",
       "      <td>0.428</td>\n",
       "      <td>-0.119</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>0.364</td>\n",
       "      <td>0.100</td>\n",
       "      <td>-0.899</td>\n",
       "      <td>0.609</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.948</td>\n",
       "      <td>0.850</td>\n",
       "      <td>0.584</td>\n",
       "      <td>0.459</td>\n",
       "      <td>0.591</td>\n",
       "      <td>-0.523</td>\n",
       "      <td>-0.591</td>\n",
       "      <td>-1.524</td>\n",
       "      <td>0.763</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.188</td>\n",
       "      <td>0.467</td>\n",
       "      <td>0.597</td>\n",
       "      <td>-0.057</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>0.364</td>\n",
       "      <td>0.053</td>\n",
       "      <td>-0.553</td>\n",
       "      <td>0.981</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1.157</td>\n",
       "      <td>1.055</td>\n",
       "      <td>0.638</td>\n",
       "      <td>0.617</td>\n",
       "      <td>1.483</td>\n",
       "      <td>-0.731</td>\n",
       "      <td>-0.612</td>\n",
       "      <td>-1.524</td>\n",
       "      <td>0.968</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.860</td>\n",
       "      <td>0.456</td>\n",
       "      <td>0.916</td>\n",
       "      <td>0.039</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>0.364</td>\n",
       "      <td>0.151</td>\n",
       "      <td>-1.157</td>\n",
       "      <td>0.818</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>1.116</td>\n",
       "      <td>1.112</td>\n",
       "      <td>0.612</td>\n",
       "      <td>0.639</td>\n",
       "      <td>0.919</td>\n",
       "      <td>-0.895</td>\n",
       "      <td>-0.656</td>\n",
       "      <td>-1.418</td>\n",
       "      <td>0.891</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.860</td>\n",
       "      <td>-0.097</td>\n",
       "      <td>0.795</td>\n",
       "      <td>-0.452</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>0.364</td>\n",
       "      <td>-0.054</td>\n",
       "      <td>-0.426</td>\n",
       "      <td>0.877</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1.093</td>\n",
       "      <td>1.120</td>\n",
       "      <td>0.522</td>\n",
       "      <td>0.797</td>\n",
       "      <td>0.953</td>\n",
       "      <td>-0.619</td>\n",
       "      <td>-0.591</td>\n",
       "      <td>-1.390</td>\n",
       "      <td>1.044</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.654</td>\n",
       "      <td>0.755</td>\n",
       "      <td>0.903</td>\n",
       "      <td>-0.627</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-2.315</td>\n",
       "      <td>-0.289</td>\n",
       "      <td>-0.054</td>\n",
       "      <td>0.079</td>\n",
       "      <td>1.077</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>-0.632</td>\n",
       "      <td>-0.959</td>\n",
       "      <td>-0.474</td>\n",
       "      <td>1.194</td>\n",
       "      <td>-0.170</td>\n",
       "      <td>-0.572</td>\n",
       "      <td>-0.779</td>\n",
       "      <td>-1.350</td>\n",
       "      <td>-1.034</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.873</td>\n",
       "      <td>-0.613</td>\n",
       "      <td>-0.949</td>\n",
       "      <td>-0.716</td>\n",
       "      <td>-0.843</td>\n",
       "      <td>-2.315</td>\n",
       "      <td>-0.289</td>\n",
       "      <td>0.410</td>\n",
       "      <td>1.837</td>\n",
       "      <td>-1.099</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>-0.999</td>\n",
       "      <td>-1.343</td>\n",
       "      <td>-0.454</td>\n",
       "      <td>1.156</td>\n",
       "      <td>-0.523</td>\n",
       "      <td>-0.786</td>\n",
       "      <td>-0.988</td>\n",
       "      <td>-1.463</td>\n",
       "      <td>-1.948</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.873</td>\n",
       "      <td>0.023</td>\n",
       "      <td>-1.803</td>\n",
       "      <td>-0.512</td>\n",
       "      <td>-0.441</td>\n",
       "      <td>-0.918</td>\n",
       "      <td>-0.943</td>\n",
       "      <td>-0.737</td>\n",
       "      <td>1.314</td>\n",
       "      <td>-1.656</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>-0.234</td>\n",
       "      <td>-0.248</td>\n",
       "      <td>-0.271</td>\n",
       "      <td>0.940</td>\n",
       "      <td>0.174</td>\n",
       "      <td>-0.610</td>\n",
       "      <td>-1.102</td>\n",
       "      <td>-1.463</td>\n",
       "      <td>-0.987</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>2.002</td>\n",
       "      <td>-0.132</td>\n",
       "      <td>-0.897</td>\n",
       "      <td>-0.170</td>\n",
       "      <td>-0.862</td>\n",
       "      <td>-1.063</td>\n",
       "      <td>-1.388</td>\n",
       "      <td>-1.230</td>\n",
       "      <td>0.940</td>\n",
       "      <td>-0.615</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>-0.898</td>\n",
       "      <td>-1.057</td>\n",
       "      <td>-0.655</td>\n",
       "      <td>0.940</td>\n",
       "      <td>-0.544</td>\n",
       "      <td>-0.654</td>\n",
       "      <td>-1.245</td>\n",
       "      <td>-1.634</td>\n",
       "      <td>-1.784</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.935</td>\n",
       "      <td>0.466</td>\n",
       "      <td>-1.566</td>\n",
       "      <td>0.264</td>\n",
       "      <td>-0.900</td>\n",
       "      <td>-1.134</td>\n",
       "      <td>-1.537</td>\n",
       "      <td>0.049</td>\n",
       "      <td>1.681</td>\n",
       "      <td>-1.366</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>-0.403</td>\n",
       "      <td>-0.486</td>\n",
       "      <td>-0.304</td>\n",
       "      <td>0.951</td>\n",
       "      <td>-0.294</td>\n",
       "      <td>-0.488</td>\n",
       "      <td>-1.290</td>\n",
       "      <td>-1.686</td>\n",
       "      <td>-1.105</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.887</td>\n",
       "      <td>1.369</td>\n",
       "      <td>-1.133</td>\n",
       "      <td>0.450</td>\n",
       "      <td>-1.760</td>\n",
       "      <td>-0.852</td>\n",
       "      <td>-2.131</td>\n",
       "      <td>-1.411</td>\n",
       "      <td>0.747</td>\n",
       "      <td>-0.345</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>-1.158</td>\n",
       "      <td>-1.538</td>\n",
       "      <td>-0.585</td>\n",
       "      <td>0.797</td>\n",
       "      <td>-0.818</td>\n",
       "      <td>-0.668</td>\n",
       "      <td>-1.416</td>\n",
       "      <td>-1.759</td>\n",
       "      <td>-2.330</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.212</td>\n",
       "      <td>0.174</td>\n",
       "      <td>-2.111</td>\n",
       "      <td>0.390</td>\n",
       "      <td>-1.760</td>\n",
       "      <td>-0.852</td>\n",
       "      <td>-2.131</td>\n",
       "      <td>-0.131</td>\n",
       "      <td>1.019</td>\n",
       "      <td>-1.625</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>-0.638</td>\n",
       "      <td>-0.312</td>\n",
       "      <td>-0.059</td>\n",
       "      <td>0.831</td>\n",
       "      <td>-0.223</td>\n",
       "      <td>-0.907</td>\n",
       "      <td>-1.403</td>\n",
       "      <td>-1.878</td>\n",
       "      <td>-1.317</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.834</td>\n",
       "      <td>0.194</td>\n",
       "      <td>-1.006</td>\n",
       "      <td>1.002</td>\n",
       "      <td>-1.760</td>\n",
       "      <td>-0.852</td>\n",
       "      <td>-2.131</td>\n",
       "      <td>-1.140</td>\n",
       "      <td>0.003</td>\n",
       "      <td>-0.735</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0.375</td>\n",
       "      <td>0.422</td>\n",
       "      <td>0.369</td>\n",
       "      <td>0.929</td>\n",
       "      <td>0.132</td>\n",
       "      <td>-1.599</td>\n",
       "      <td>-1.263</td>\n",
       "      <td>-1.878</td>\n",
       "      <td>-0.323</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.163</td>\n",
       "      <td>-0.123</td>\n",
       "      <td>-0.342</td>\n",
       "      <td>0.913</td>\n",
       "      <td>-0.613</td>\n",
       "      <td>-0.571</td>\n",
       "      <td>-0.943</td>\n",
       "      <td>-0.891</td>\n",
       "      <td>-0.536</td>\n",
       "      <td>-0.153</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>0.211</td>\n",
       "      <td>0.385</td>\n",
       "      <td>0.491</td>\n",
       "      <td>1.182</td>\n",
       "      <td>-0.035</td>\n",
       "      <td>-1.287</td>\n",
       "      <td>-1.127</td>\n",
       "      <td>-1.840</td>\n",
       "      <td>-0.612</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.131</td>\n",
       "      <td>-0.574</td>\n",
       "      <td>-0.363</td>\n",
       "      <td>0.170</td>\n",
       "      <td>-0.613</td>\n",
       "      <td>-0.548</td>\n",
       "      <td>-0.943</td>\n",
       "      <td>-0.084</td>\n",
       "      <td>-0.780</td>\n",
       "      <td>0.054</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>-0.041</td>\n",
       "      <td>0.093</td>\n",
       "      <td>0.354</td>\n",
       "      <td>1.264</td>\n",
       "      <td>-0.221</td>\n",
       "      <td>-1.078</td>\n",
       "      <td>-1.028</td>\n",
       "      <td>-1.801</td>\n",
       "      <td>-0.749</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.225</td>\n",
       "      <td>-0.564</td>\n",
       "      <td>-0.456</td>\n",
       "      <td>-0.524</td>\n",
       "      <td>3.171</td>\n",
       "      <td>2.635</td>\n",
       "      <td>-1.596</td>\n",
       "      <td>0.267</td>\n",
       "      <td>-0.123</td>\n",
       "      <td>0.037</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.369</td>\n",
       "      <td>0.479</td>\n",
       "      <td>0.723</td>\n",
       "      <td>1.360</td>\n",
       "      <td>0.072</td>\n",
       "      <td>-0.747</td>\n",
       "      <td>-0.888</td>\n",
       "      <td>-1.746</td>\n",
       "      <td>0.099</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.405</td>\n",
       "      <td>-0.861</td>\n",
       "      <td>-0.058</td>\n",
       "      <td>-0.894</td>\n",
       "      <td>3.802</td>\n",
       "      <td>1.173</td>\n",
       "      <td>-0.943</td>\n",
       "      <td>-0.474</td>\n",
       "      <td>-0.824</td>\n",
       "      <td>0.295</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>-0.143</td>\n",
       "      <td>-0.345</td>\n",
       "      <td>0.363</td>\n",
       "      <td>1.313</td>\n",
       "      <td>0.040</td>\n",
       "      <td>-0.516</td>\n",
       "      <td>-0.754</td>\n",
       "      <td>-1.617</td>\n",
       "      <td>-0.643</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.405</td>\n",
       "      <td>-0.901</td>\n",
       "      <td>-0.467</td>\n",
       "      <td>-0.957</td>\n",
       "      <td>4.731</td>\n",
       "      <td>3.872</td>\n",
       "      <td>-0.943</td>\n",
       "      <td>-0.120</td>\n",
       "      <td>0.311</td>\n",
       "      <td>0.064</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>-2.028</td>\n",
       "      <td>-2.665</td>\n",
       "      <td>-0.467</td>\n",
       "      <td>0.435</td>\n",
       "      <td>-1.479</td>\n",
       "      <td>-0.562</td>\n",
       "      <td>-0.798</td>\n",
       "      <td>-1.617</td>\n",
       "      <td>-2.754</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.114</td>\n",
       "      <td>-0.636</td>\n",
       "      <td>-2.632</td>\n",
       "      <td>-0.988</td>\n",
       "      <td>2.483</td>\n",
       "      <td>1.416</td>\n",
       "      <td>-0.289</td>\n",
       "      <td>1.959</td>\n",
       "      <td>1.796</td>\n",
       "      <td>-2.586</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>-1.692</td>\n",
       "      <td>-2.180</td>\n",
       "      <td>-0.595</td>\n",
       "      <td>-0.669</td>\n",
       "      <td>-0.854</td>\n",
       "      <td>-0.574</td>\n",
       "      <td>-0.899</td>\n",
       "      <td>-1.610</td>\n",
       "      <td>-2.546</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.152</td>\n",
       "      <td>-0.197</td>\n",
       "      <td>-2.397</td>\n",
       "      <td>-0.907</td>\n",
       "      <td>1.107</td>\n",
       "      <td>0.385</td>\n",
       "      <td>-0.289</td>\n",
       "      <td>-1.239</td>\n",
       "      <td>1.484</td>\n",
       "      <td>-2.613</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>0.618</td>\n",
       "      <td>0.245</td>\n",
       "      <td>0.382</td>\n",
       "      <td>-0.131</td>\n",
       "      <td>0.966</td>\n",
       "      <td>-1.081</td>\n",
       "      <td>-0.892</td>\n",
       "      <td>-1.640</td>\n",
       "      <td>0.291</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>0.568</td>\n",
       "      <td>0.332</td>\n",
       "      <td>-0.252</td>\n",
       "      <td>0.033</td>\n",
       "      <td>0.820</td>\n",
       "      <td>0.554</td>\n",
       "      <td>-0.289</td>\n",
       "      <td>-2.565</td>\n",
       "      <td>-0.957</td>\n",
       "      <td>-0.073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>1.196</td>\n",
       "      <td>1.166</td>\n",
       "      <td>0.748</td>\n",
       "      <td>-0.596</td>\n",
       "      <td>1.421</td>\n",
       "      <td>-1.184</td>\n",
       "      <td>-0.808</td>\n",
       "      <td>-1.682</td>\n",
       "      <td>0.587</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.095</td>\n",
       "      <td>2.050</td>\n",
       "      <td>0.700</td>\n",
       "      <td>1.204</td>\n",
       "      <td>0.534</td>\n",
       "      <td>1.416</td>\n",
       "      <td>0.310</td>\n",
       "      <td>-1.918</td>\n",
       "      <td>-1.106</td>\n",
       "      <td>1.273</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>1.106</td>\n",
       "      <td>1.177</td>\n",
       "      <td>1.033</td>\n",
       "      <td>-0.045</td>\n",
       "      <td>1.124</td>\n",
       "      <td>-1.814</td>\n",
       "      <td>-0.490</td>\n",
       "      <td>-1.549</td>\n",
       "      <td>0.544</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.329</td>\n",
       "      <td>-0.102</td>\n",
       "      <td>0.668</td>\n",
       "      <td>-0.080</td>\n",
       "      <td>0.820</td>\n",
       "      <td>1.454</td>\n",
       "      <td>0.364</td>\n",
       "      <td>0.088</td>\n",
       "      <td>-1.030</td>\n",
       "      <td>1.849</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>0.462</td>\n",
       "      <td>0.480</td>\n",
       "      <td>0.593</td>\n",
       "      <td>-0.319</td>\n",
       "      <td>0.333</td>\n",
       "      <td>-1.293</td>\n",
       "      <td>-0.382</td>\n",
       "      <td>-1.549</td>\n",
       "      <td>-0.160</td>\n",
       "      <td>-2.114</td>\n",
       "      <td>...</td>\n",
       "      <td>1.027</td>\n",
       "      <td>-0.285</td>\n",
       "      <td>0.079</td>\n",
       "      <td>-0.727</td>\n",
       "      <td>-0.135</td>\n",
       "      <td>0.043</td>\n",
       "      <td>0.364</td>\n",
       "      <td>2.010</td>\n",
       "      <td>-0.164</td>\n",
       "      <td>0.718</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2858</th>\n",
       "      <td>0.430</td>\n",
       "      <td>0.225</td>\n",
       "      <td>-0.893</td>\n",
       "      <td>-0.803</td>\n",
       "      <td>0.490</td>\n",
       "      <td>0.131</td>\n",
       "      <td>-0.610</td>\n",
       "      <td>-0.388</td>\n",
       "      <td>0.063</td>\n",
       "      <td>0.042</td>\n",
       "      <td>...</td>\n",
       "      <td>1.517</td>\n",
       "      <td>-2.440</td>\n",
       "      <td>0.318</td>\n",
       "      <td>-2.285</td>\n",
       "      <td>-4.627</td>\n",
       "      <td>-4.789</td>\n",
       "      <td>0.364</td>\n",
       "      <td>0.083</td>\n",
       "      <td>1.578</td>\n",
       "      <td>-0.258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2859</th>\n",
       "      <td>0.425</td>\n",
       "      <td>0.343</td>\n",
       "      <td>-0.725</td>\n",
       "      <td>-0.803</td>\n",
       "      <td>0.515</td>\n",
       "      <td>-0.069</td>\n",
       "      <td>-0.658</td>\n",
       "      <td>-0.411</td>\n",
       "      <td>0.031</td>\n",
       "      <td>0.042</td>\n",
       "      <td>...</td>\n",
       "      <td>1.754</td>\n",
       "      <td>0.242</td>\n",
       "      <td>0.206</td>\n",
       "      <td>-0.838</td>\n",
       "      <td>-2.620</td>\n",
       "      <td>-2.821</td>\n",
       "      <td>0.720</td>\n",
       "      <td>-0.444</td>\n",
       "      <td>1.112</td>\n",
       "      <td>-0.194</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2860</th>\n",
       "      <td>0.815</td>\n",
       "      <td>0.932</td>\n",
       "      <td>0.101</td>\n",
       "      <td>-0.655</td>\n",
       "      <td>0.955</td>\n",
       "      <td>-0.568</td>\n",
       "      <td>-0.534</td>\n",
       "      <td>-0.437</td>\n",
       "      <td>0.648</td>\n",
       "      <td>0.329</td>\n",
       "      <td>...</td>\n",
       "      <td>1.621</td>\n",
       "      <td>0.368</td>\n",
       "      <td>0.199</td>\n",
       "      <td>-0.331</td>\n",
       "      <td>-1.784</td>\n",
       "      <td>-2.001</td>\n",
       "      <td>0.720</td>\n",
       "      <td>-0.648</td>\n",
       "      <td>-0.509</td>\n",
       "      <td>0.104</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2861</th>\n",
       "      <td>0.872</td>\n",
       "      <td>0.872</td>\n",
       "      <td>0.114</td>\n",
       "      <td>-0.477</td>\n",
       "      <td>0.688</td>\n",
       "      <td>0.135</td>\n",
       "      <td>-0.317</td>\n",
       "      <td>-0.437</td>\n",
       "      <td>0.783</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>1.127</td>\n",
       "      <td>0.875</td>\n",
       "      <td>0.468</td>\n",
       "      <td>-0.226</td>\n",
       "      <td>-0.116</td>\n",
       "      <td>-0.121</td>\n",
       "      <td>0.720</td>\n",
       "      <td>-0.256</td>\n",
       "      <td>0.009</td>\n",
       "      <td>0.418</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2862</th>\n",
       "      <td>0.161</td>\n",
       "      <td>0.362</td>\n",
       "      <td>-0.631</td>\n",
       "      <td>0.028</td>\n",
       "      <td>0.302</td>\n",
       "      <td>0.156</td>\n",
       "      <td>-0.280</td>\n",
       "      <td>-0.324</td>\n",
       "      <td>-0.164</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>0.746</td>\n",
       "      <td>-0.360</td>\n",
       "      <td>0.689</td>\n",
       "      <td>-0.475</td>\n",
       "      <td>-0.652</td>\n",
       "      <td>-0.834</td>\n",
       "      <td>0.720</td>\n",
       "      <td>1.084</td>\n",
       "      <td>1.496</td>\n",
       "      <td>0.204</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2863</th>\n",
       "      <td>-0.927</td>\n",
       "      <td>-0.998</td>\n",
       "      <td>-0.838</td>\n",
       "      <td>0.145</td>\n",
       "      <td>-0.299</td>\n",
       "      <td>0.064</td>\n",
       "      <td>-0.407</td>\n",
       "      <td>-0.324</td>\n",
       "      <td>-1.369</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>0.745</td>\n",
       "      <td>0.294</td>\n",
       "      <td>-0.334</td>\n",
       "      <td>-0.425</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-2.540</td>\n",
       "      <td>0.839</td>\n",
       "      <td>0.221</td>\n",
       "      <td>1.021</td>\n",
       "      <td>0.303</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2864</th>\n",
       "      <td>-0.024</td>\n",
       "      <td>0.348</td>\n",
       "      <td>-0.255</td>\n",
       "      <td>0.147</td>\n",
       "      <td>0.061</td>\n",
       "      <td>-0.105</td>\n",
       "      <td>-0.390</td>\n",
       "      <td>-0.316</td>\n",
       "      <td>-0.342</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>0.743</td>\n",
       "      <td>-0.298</td>\n",
       "      <td>-0.171</td>\n",
       "      <td>0.606</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-2.540</td>\n",
       "      <td>0.839</td>\n",
       "      <td>-0.094</td>\n",
       "      <td>0.260</td>\n",
       "      <td>0.766</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2865</th>\n",
       "      <td>-0.993</td>\n",
       "      <td>-1.132</td>\n",
       "      <td>-0.841</td>\n",
       "      <td>0.070</td>\n",
       "      <td>0.090</td>\n",
       "      <td>-0.083</td>\n",
       "      <td>-0.333</td>\n",
       "      <td>-0.300</td>\n",
       "      <td>-1.249</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>0.589</td>\n",
       "      <td>0.050</td>\n",
       "      <td>-0.228</td>\n",
       "      <td>0.186</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>0.839</td>\n",
       "      <td>0.827</td>\n",
       "      <td>1.375</td>\n",
       "      <td>-0.409</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2866</th>\n",
       "      <td>-0.433</td>\n",
       "      <td>-0.544</td>\n",
       "      <td>-0.866</td>\n",
       "      <td>-0.480</td>\n",
       "      <td>0.459</td>\n",
       "      <td>0.034</td>\n",
       "      <td>-0.370</td>\n",
       "      <td>-0.335</td>\n",
       "      <td>-0.767</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>0.589</td>\n",
       "      <td>-0.115</td>\n",
       "      <td>-0.529</td>\n",
       "      <td>0.036</td>\n",
       "      <td>0.056</td>\n",
       "      <td>-0.196</td>\n",
       "      <td>0.839</td>\n",
       "      <td>0.029</td>\n",
       "      <td>1.225</td>\n",
       "      <td>-0.766</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2867</th>\n",
       "      <td>0.319</td>\n",
       "      <td>0.164</td>\n",
       "      <td>-0.207</td>\n",
       "      <td>-0.692</td>\n",
       "      <td>0.312</td>\n",
       "      <td>-0.013</td>\n",
       "      <td>-0.354</td>\n",
       "      <td>-0.335</td>\n",
       "      <td>0.070</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>0.453</td>\n",
       "      <td>0.071</td>\n",
       "      <td>-0.559</td>\n",
       "      <td>0.269</td>\n",
       "      <td>0.648</td>\n",
       "      <td>0.385</td>\n",
       "      <td>0.839</td>\n",
       "      <td>-0.724</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>-0.189</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2868</th>\n",
       "      <td>0.296</td>\n",
       "      <td>0.477</td>\n",
       "      <td>-0.417</td>\n",
       "      <td>-0.828</td>\n",
       "      <td>0.212</td>\n",
       "      <td>-0.133</td>\n",
       "      <td>-0.306</td>\n",
       "      <td>-0.357</td>\n",
       "      <td>0.050</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>0.139</td>\n",
       "      <td>1.830</td>\n",
       "      <td>0.194</td>\n",
       "      <td>1.350</td>\n",
       "      <td>0.304</td>\n",
       "      <td>0.160</td>\n",
       "      <td>0.839</td>\n",
       "      <td>-1.033</td>\n",
       "      <td>0.404</td>\n",
       "      <td>-0.099</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2869</th>\n",
       "      <td>0.490</td>\n",
       "      <td>0.497</td>\n",
       "      <td>-0.043</td>\n",
       "      <td>-0.828</td>\n",
       "      <td>0.245</td>\n",
       "      <td>-0.324</td>\n",
       "      <td>-0.193</td>\n",
       "      <td>-0.298</td>\n",
       "      <td>0.243</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>0.139</td>\n",
       "      <td>0.327</td>\n",
       "      <td>0.336</td>\n",
       "      <td>0.806</td>\n",
       "      <td>0.648</td>\n",
       "      <td>0.160</td>\n",
       "      <td>0.839</td>\n",
       "      <td>-0.116</td>\n",
       "      <td>-0.649</td>\n",
       "      <td>0.012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2870</th>\n",
       "      <td>0.446</td>\n",
       "      <td>0.240</td>\n",
       "      <td>0.727</td>\n",
       "      <td>-0.656</td>\n",
       "      <td>-0.272</td>\n",
       "      <td>-0.227</td>\n",
       "      <td>0.045</td>\n",
       "      <td>-0.298</td>\n",
       "      <td>0.231</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.206</td>\n",
       "      <td>1.327</td>\n",
       "      <td>0.325</td>\n",
       "      <td>1.484</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.355</td>\n",
       "      <td>0.839</td>\n",
       "      <td>-0.016</td>\n",
       "      <td>-1.318</td>\n",
       "      <td>0.249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2871</th>\n",
       "      <td>0.494</td>\n",
       "      <td>0.640</td>\n",
       "      <td>0.339</td>\n",
       "      <td>-0.221</td>\n",
       "      <td>0.149</td>\n",
       "      <td>-0.181</td>\n",
       "      <td>0.159</td>\n",
       "      <td>-0.160</td>\n",
       "      <td>0.241</td>\n",
       "      <td>0.473</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.666</td>\n",
       "      <td>0.763</td>\n",
       "      <td>0.436</td>\n",
       "      <td>1.143</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.346</td>\n",
       "      <td>0.839</td>\n",
       "      <td>0.339</td>\n",
       "      <td>-0.517</td>\n",
       "      <td>0.342</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2872</th>\n",
       "      <td>0.173</td>\n",
       "      <td>0.074</td>\n",
       "      <td>0.843</td>\n",
       "      <td>-0.017</td>\n",
       "      <td>-0.733</td>\n",
       "      <td>-0.105</td>\n",
       "      <td>0.348</td>\n",
       "      <td>-0.008</td>\n",
       "      <td>0.384</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.781</td>\n",
       "      <td>1.002</td>\n",
       "      <td>0.456</td>\n",
       "      <td>0.999</td>\n",
       "      <td>-0.438</td>\n",
       "      <td>-0.754</td>\n",
       "      <td>0.547</td>\n",
       "      <td>0.218</td>\n",
       "      <td>-1.319</td>\n",
       "      <td>0.224</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2873</th>\n",
       "      <td>-0.417</td>\n",
       "      <td>0.096</td>\n",
       "      <td>-0.129</td>\n",
       "      <td>-0.028</td>\n",
       "      <td>-1.104</td>\n",
       "      <td>0.072</td>\n",
       "      <td>0.336</td>\n",
       "      <td>0.051</td>\n",
       "      <td>-0.154</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.351</td>\n",
       "      <td>1.452</td>\n",
       "      <td>0.352</td>\n",
       "      <td>0.809</td>\n",
       "      <td>-0.470</td>\n",
       "      <td>-0.726</td>\n",
       "      <td>0.423</td>\n",
       "      <td>0.215</td>\n",
       "      <td>0.158</td>\n",
       "      <td>-0.031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2874</th>\n",
       "      <td>0.375</td>\n",
       "      <td>0.595</td>\n",
       "      <td>0.177</td>\n",
       "      <td>0.011</td>\n",
       "      <td>-0.527</td>\n",
       "      <td>-0.112</td>\n",
       "      <td>0.342</td>\n",
       "      <td>0.062</td>\n",
       "      <td>0.437</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.249</td>\n",
       "      <td>-0.202</td>\n",
       "      <td>0.396</td>\n",
       "      <td>-0.064</td>\n",
       "      <td>0.304</td>\n",
       "      <td>0.160</td>\n",
       "      <td>0.364</td>\n",
       "      <td>-0.303</td>\n",
       "      <td>-0.439</td>\n",
       "      <td>0.579</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2875</th>\n",
       "      <td>-0.765</td>\n",
       "      <td>-0.023</td>\n",
       "      <td>0.434</td>\n",
       "      <td>-0.045</td>\n",
       "      <td>-1.408</td>\n",
       "      <td>0.372</td>\n",
       "      <td>0.524</td>\n",
       "      <td>0.171</td>\n",
       "      <td>0.348</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.453</td>\n",
       "      <td>1.036</td>\n",
       "      <td>0.381</td>\n",
       "      <td>1.993</td>\n",
       "      <td>0.304</td>\n",
       "      <td>-0.065</td>\n",
       "      <td>-0.156</td>\n",
       "      <td>0.372</td>\n",
       "      <td>0.257</td>\n",
       "      <td>0.081</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2876</th>\n",
       "      <td>-0.704</td>\n",
       "      <td>0.246</td>\n",
       "      <td>-0.078</td>\n",
       "      <td>-0.131</td>\n",
       "      <td>-0.630</td>\n",
       "      <td>0.004</td>\n",
       "      <td>0.466</td>\n",
       "      <td>0.195</td>\n",
       "      <td>-0.016</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.475</td>\n",
       "      <td>0.195</td>\n",
       "      <td>0.381</td>\n",
       "      <td>0.646</td>\n",
       "      <td>0.304</td>\n",
       "      <td>0.273</td>\n",
       "      <td>-0.230</td>\n",
       "      <td>-0.207</td>\n",
       "      <td>-0.112</td>\n",
       "      <td>0.539</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2877</th>\n",
       "      <td>0.041</td>\n",
       "      <td>0.459</td>\n",
       "      <td>0.460</td>\n",
       "      <td>-0.185</td>\n",
       "      <td>-0.421</td>\n",
       "      <td>0.195</td>\n",
       "      <td>0.544</td>\n",
       "      <td>0.219</td>\n",
       "      <td>0.679</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.423</td>\n",
       "      <td>0.730</td>\n",
       "      <td>0.487</td>\n",
       "      <td>0.368</td>\n",
       "      <td>0.017</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>0.177</td>\n",
       "      <td>-0.537</td>\n",
       "      <td>0.565</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2878</th>\n",
       "      <td>0.363</td>\n",
       "      <td>0.650</td>\n",
       "      <td>0.315</td>\n",
       "      <td>-0.148</td>\n",
       "      <td>-0.374</td>\n",
       "      <td>-0.072</td>\n",
       "      <td>0.619</td>\n",
       "      <td>0.336</td>\n",
       "      <td>0.631</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.267</td>\n",
       "      <td>-0.135</td>\n",
       "      <td>0.575</td>\n",
       "      <td>0.582</td>\n",
       "      <td>0.017</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>0.051</td>\n",
       "      <td>-0.136</td>\n",
       "      <td>0.709</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2879</th>\n",
       "      <td>0.666</td>\n",
       "      <td>0.801</td>\n",
       "      <td>0.459</td>\n",
       "      <td>-0.107</td>\n",
       "      <td>0.125</td>\n",
       "      <td>-0.073</td>\n",
       "      <td>0.690</td>\n",
       "      <td>0.336</td>\n",
       "      <td>0.863</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.109</td>\n",
       "      <td>0.607</td>\n",
       "      <td>0.697</td>\n",
       "      <td>1.128</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>-0.087</td>\n",
       "      <td>0.049</td>\n",
       "      <td>0.917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2880</th>\n",
       "      <td>0.621</td>\n",
       "      <td>0.685</td>\n",
       "      <td>0.162</td>\n",
       "      <td>-0.078</td>\n",
       "      <td>0.625</td>\n",
       "      <td>-0.117</td>\n",
       "      <td>0.658</td>\n",
       "      <td>0.437</td>\n",
       "      <td>0.580</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.693</td>\n",
       "      <td>0.366</td>\n",
       "      <td>0.839</td>\n",
       "      <td>1.297</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>0.359</td>\n",
       "      <td>-0.276</td>\n",
       "      <td>0.682</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2881</th>\n",
       "      <td>0.950</td>\n",
       "      <td>0.889</td>\n",
       "      <td>0.340</td>\n",
       "      <td>0.006</td>\n",
       "      <td>0.417</td>\n",
       "      <td>-0.083</td>\n",
       "      <td>0.739</td>\n",
       "      <td>0.474</td>\n",
       "      <td>1.090</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.174</td>\n",
       "      <td>0.644</td>\n",
       "      <td>0.839</td>\n",
       "      <td>0.485</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>-0.038</td>\n",
       "      <td>0.149</td>\n",
       "      <td>0.892</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2882</th>\n",
       "      <td>0.698</td>\n",
       "      <td>0.812</td>\n",
       "      <td>0.169</td>\n",
       "      <td>0.125</td>\n",
       "      <td>0.580</td>\n",
       "      <td>0.057</td>\n",
       "      <td>0.781</td>\n",
       "      <td>0.511</td>\n",
       "      <td>0.866</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.174</td>\n",
       "      <td>0.307</td>\n",
       "      <td>0.902</td>\n",
       "      <td>0.257</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.290</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>0.407</td>\n",
       "      <td>0.230</td>\n",
       "      <td>0.812</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2883</th>\n",
       "      <td>0.190</td>\n",
       "      <td>-0.025</td>\n",
       "      <td>-0.138</td>\n",
       "      <td>0.161</td>\n",
       "      <td>0.600</td>\n",
       "      <td>-0.212</td>\n",
       "      <td>0.757</td>\n",
       "      <td>0.584</td>\n",
       "      <td>-0.026</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>0.128</td>\n",
       "      <td>-0.208</td>\n",
       "      <td>0.809</td>\n",
       "      <td>-0.173</td>\n",
       "      <td>0.247</td>\n",
       "      <td>-0.027</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>0.576</td>\n",
       "      <td>0.686</td>\n",
       "      <td>0.235</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2884</th>\n",
       "      <td>0.507</td>\n",
       "      <td>0.557</td>\n",
       "      <td>0.296</td>\n",
       "      <td>0.183</td>\n",
       "      <td>0.530</td>\n",
       "      <td>-0.237</td>\n",
       "      <td>0.749</td>\n",
       "      <td>0.584</td>\n",
       "      <td>0.537</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>0.291</td>\n",
       "      <td>-0.287</td>\n",
       "      <td>0.465</td>\n",
       "      <td>-0.310</td>\n",
       "      <td>0.763</td>\n",
       "      <td>0.498</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>-0.615</td>\n",
       "      <td>-0.380</td>\n",
       "      <td>1.042</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2885</th>\n",
       "      <td>-0.394</td>\n",
       "      <td>-0.721</td>\n",
       "      <td>-0.485</td>\n",
       "      <td>0.084</td>\n",
       "      <td>0.136</td>\n",
       "      <td>0.034</td>\n",
       "      <td>0.655</td>\n",
       "      <td>0.614</td>\n",
       "      <td>-0.818</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>0.291</td>\n",
       "      <td>-0.179</td>\n",
       "      <td>0.268</td>\n",
       "      <td>0.552</td>\n",
       "      <td>0.763</td>\n",
       "      <td>0.498</td>\n",
       "      <td>-0.349</td>\n",
       "      <td>0.951</td>\n",
       "      <td>0.748</td>\n",
       "      <td>0.005</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2886</th>\n",
       "      <td>-0.219</td>\n",
       "      <td>-0.282</td>\n",
       "      <td>-0.344</td>\n",
       "      <td>-0.049</td>\n",
       "      <td>0.449</td>\n",
       "      <td>-0.140</td>\n",
       "      <td>0.560</td>\n",
       "      <td>0.583</td>\n",
       "      <td>-0.596</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>0.216</td>\n",
       "      <td>1.061</td>\n",
       "      <td>-0.051</td>\n",
       "      <td>1.023</td>\n",
       "      <td>0.878</td>\n",
       "      <td>0.610</td>\n",
       "      <td>-0.230</td>\n",
       "      <td>-0.301</td>\n",
       "      <td>0.555</td>\n",
       "      <td>0.350</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2887</th>\n",
       "      <td>0.368</td>\n",
       "      <td>0.380</td>\n",
       "      <td>-0.225</td>\n",
       "      <td>-0.049</td>\n",
       "      <td>0.379</td>\n",
       "      <td>0.092</td>\n",
       "      <td>0.550</td>\n",
       "      <td>0.551</td>\n",
       "      <td>0.244</td>\n",
       "      <td>0.904</td>\n",
       "      <td>...</td>\n",
       "      <td>0.047</td>\n",
       "      <td>0.057</td>\n",
       "      <td>-0.042</td>\n",
       "      <td>0.847</td>\n",
       "      <td>0.534</td>\n",
       "      <td>-0.009</td>\n",
       "      <td>-0.190</td>\n",
       "      <td>-0.567</td>\n",
       "      <td>0.388</td>\n",
       "      <td>0.417</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2888 rows × 39 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         V0     V1     V2     V3     V4     V5     V6     V7     V8     V9  \\\n",
       "0     0.566  0.016 -0.143  0.407  0.452 -0.901 -1.812 -2.360 -0.436 -2.114   \n",
       "1     0.968  0.437  0.066  0.566  0.194 -0.893 -1.566 -2.360  0.332 -2.114   \n",
       "2     1.013  0.568  0.235  0.370  0.112 -0.797 -1.367 -2.360  0.396 -2.114   \n",
       "3     0.733  0.368  0.283  0.165  0.599 -0.679 -1.200 -2.086  0.403 -2.114   \n",
       "4     0.684  0.638  0.260  0.209  0.337 -0.454 -1.073 -2.086  0.314 -2.114   \n",
       "5     0.445  0.627  0.408  0.220  0.458 -1.056 -1.009 -1.896  0.481 -2.114   \n",
       "6     0.889  0.416  0.640  0.356  0.224 -0.893 -0.812 -1.823  0.729 -2.114   \n",
       "7     0.984  0.529  0.704  0.438  0.258 -0.917 -0.682 -1.721  0.753 -2.114   \n",
       "8     0.948  0.850  0.584  0.459  0.591 -0.523 -0.591 -1.524  0.763 -2.114   \n",
       "9     1.157  1.055  0.638  0.617  1.483 -0.731 -0.612 -1.524  0.968 -2.114   \n",
       "10    1.116  1.112  0.612  0.639  0.919 -0.895 -0.656 -1.418  0.891 -2.114   \n",
       "11    1.093  1.120  0.522  0.797  0.953 -0.619 -0.591 -1.390  1.044 -2.114   \n",
       "12   -0.632 -0.959 -0.474  1.194 -0.170 -0.572 -0.779 -1.350 -1.034 -2.114   \n",
       "13   -0.999 -1.343 -0.454  1.156 -0.523 -0.786 -0.988 -1.463 -1.948 -2.114   \n",
       "14   -0.234 -0.248 -0.271  0.940  0.174 -0.610 -1.102 -1.463 -0.987 -2.114   \n",
       "15   -0.898 -1.057 -0.655  0.940 -0.544 -0.654 -1.245 -1.634 -1.784 -2.114   \n",
       "16   -0.403 -0.486 -0.304  0.951 -0.294 -0.488 -1.290 -1.686 -1.105 -2.114   \n",
       "17   -1.158 -1.538 -0.585  0.797 -0.818 -0.668 -1.416 -1.759 -2.330 -2.114   \n",
       "18   -0.638 -0.312 -0.059  0.831 -0.223 -0.907 -1.403 -1.878 -1.317 -2.114   \n",
       "19    0.375  0.422  0.369  0.929  0.132 -1.599 -1.263 -1.878 -0.323 -2.114   \n",
       "20    0.211  0.385  0.491  1.182 -0.035 -1.287 -1.127 -1.840 -0.612 -2.114   \n",
       "21   -0.041  0.093  0.354  1.264 -0.221 -1.078 -1.028 -1.801 -0.749 -2.114   \n",
       "22    0.369  0.479  0.723  1.360  0.072 -0.747 -0.888 -1.746  0.099 -2.114   \n",
       "23   -0.143 -0.345  0.363  1.313  0.040 -0.516 -0.754 -1.617 -0.643 -2.114   \n",
       "24   -2.028 -2.665 -0.467  0.435 -1.479 -0.562 -0.798 -1.617 -2.754 -2.114   \n",
       "25   -1.692 -2.180 -0.595 -0.669 -0.854 -0.574 -0.899 -1.610 -2.546 -2.114   \n",
       "26    0.618  0.245  0.382 -0.131  0.966 -1.081 -0.892 -1.640  0.291 -2.114   \n",
       "27    1.196  1.166  0.748 -0.596  1.421 -1.184 -0.808 -1.682  0.587 -2.114   \n",
       "28    1.106  1.177  1.033 -0.045  1.124 -1.814 -0.490 -1.549  0.544 -2.114   \n",
       "29    0.462  0.480  0.593 -0.319  0.333 -1.293 -0.382 -1.549 -0.160 -2.114   \n",
       "...     ...    ...    ...    ...    ...    ...    ...    ...    ...    ...   \n",
       "2858  0.430  0.225 -0.893 -0.803  0.490  0.131 -0.610 -0.388  0.063  0.042   \n",
       "2859  0.425  0.343 -0.725 -0.803  0.515 -0.069 -0.658 -0.411  0.031  0.042   \n",
       "2860  0.815  0.932  0.101 -0.655  0.955 -0.568 -0.534 -0.437  0.648  0.329   \n",
       "2861  0.872  0.872  0.114 -0.477  0.688  0.135 -0.317 -0.437  0.783  0.473   \n",
       "2862  0.161  0.362 -0.631  0.028  0.302  0.156 -0.280 -0.324 -0.164  0.473   \n",
       "2863 -0.927 -0.998 -0.838  0.145 -0.299  0.064 -0.407 -0.324 -1.369  0.473   \n",
       "2864 -0.024  0.348 -0.255  0.147  0.061 -0.105 -0.390 -0.316 -0.342  0.473   \n",
       "2865 -0.993 -1.132 -0.841  0.070  0.090 -0.083 -0.333 -0.300 -1.249  0.473   \n",
       "2866 -0.433 -0.544 -0.866 -0.480  0.459  0.034 -0.370 -0.335 -0.767  0.473   \n",
       "2867  0.319  0.164 -0.207 -0.692  0.312 -0.013 -0.354 -0.335  0.070  0.473   \n",
       "2868  0.296  0.477 -0.417 -0.828  0.212 -0.133 -0.306 -0.357  0.050  0.473   \n",
       "2869  0.490  0.497 -0.043 -0.828  0.245 -0.324 -0.193 -0.298  0.243  0.473   \n",
       "2870  0.446  0.240  0.727 -0.656 -0.272 -0.227  0.045 -0.298  0.231  0.473   \n",
       "2871  0.494  0.640  0.339 -0.221  0.149 -0.181  0.159 -0.160  0.241  0.473   \n",
       "2872  0.173  0.074  0.843 -0.017 -0.733 -0.105  0.348 -0.008  0.384  0.904   \n",
       "2873 -0.417  0.096 -0.129 -0.028 -1.104  0.072  0.336  0.051 -0.154  0.904   \n",
       "2874  0.375  0.595  0.177  0.011 -0.527 -0.112  0.342  0.062  0.437  0.904   \n",
       "2875 -0.765 -0.023  0.434 -0.045 -1.408  0.372  0.524  0.171  0.348  0.904   \n",
       "2876 -0.704  0.246 -0.078 -0.131 -0.630  0.004  0.466  0.195 -0.016  0.904   \n",
       "2877  0.041  0.459  0.460 -0.185 -0.421  0.195  0.544  0.219  0.679  0.904   \n",
       "2878  0.363  0.650  0.315 -0.148 -0.374 -0.072  0.619  0.336  0.631  0.904   \n",
       "2879  0.666  0.801  0.459 -0.107  0.125 -0.073  0.690  0.336  0.863  0.904   \n",
       "2880  0.621  0.685  0.162 -0.078  0.625 -0.117  0.658  0.437  0.580  0.904   \n",
       "2881  0.950  0.889  0.340  0.006  0.417 -0.083  0.739  0.474  1.090  0.904   \n",
       "2882  0.698  0.812  0.169  0.125  0.580  0.057  0.781  0.511  0.866  0.904   \n",
       "2883  0.190 -0.025 -0.138  0.161  0.600 -0.212  0.757  0.584 -0.026  0.904   \n",
       "2884  0.507  0.557  0.296  0.183  0.530 -0.237  0.749  0.584  0.537  0.904   \n",
       "2885 -0.394 -0.721 -0.485  0.084  0.136  0.034  0.655  0.614 -0.818  0.904   \n",
       "2886 -0.219 -0.282 -0.344 -0.049  0.449 -0.140  0.560  0.583 -0.596  0.904   \n",
       "2887  0.368  0.380 -0.225 -0.049  0.379  0.092  0.550  0.551  0.244  0.904   \n",
       "\n",
       "       ...      V29    V30    V31    V32    V33    V34    V35    V36    V37  \\\n",
       "0      ...    0.136  0.109 -0.615  0.327 -4.627 -4.789 -5.101 -2.608 -3.508   \n",
       "1      ...   -0.128  0.124  0.032  0.600 -0.843  0.160  0.364 -0.335 -0.730   \n",
       "2      ...   -0.009  0.361  0.277 -0.116 -0.843  0.160  0.364  0.765 -0.589   \n",
       "3      ...    0.015  0.417  0.279  0.603 -0.843 -0.065  0.364  0.333 -0.112   \n",
       "4      ...    0.183  1.078  0.328  0.418 -0.843 -0.215  0.364 -0.280 -0.028   \n",
       "5      ...    0.454  0.674  0.358  0.618 -0.843 -0.290  0.364 -0.191 -0.883   \n",
       "6      ...    0.454  0.081  0.243  0.468 -0.843 -0.290  0.364 -0.155 -1.318   \n",
       "7      ...    0.139 -0.050  0.428 -0.119 -0.843 -0.290  0.364  0.100 -0.899   \n",
       "8      ...    0.188  0.467  0.597 -0.057 -0.843 -0.290  0.364  0.053 -0.553   \n",
       "9      ...    0.860  0.456  0.916  0.039 -0.843 -0.290  0.364  0.151 -1.157   \n",
       "10     ...    0.860 -0.097  0.795 -0.452 -0.843 -0.290  0.364 -0.054 -0.426   \n",
       "11     ...    1.654  0.755  0.903 -0.627 -0.843 -2.315 -0.289 -0.054  0.079   \n",
       "12     ...    1.873 -0.613 -0.949 -0.716 -0.843 -2.315 -0.289  0.410  1.837   \n",
       "13     ...    1.873  0.023 -1.803 -0.512 -0.441 -0.918 -0.943 -0.737  1.314   \n",
       "14     ...    2.002 -0.132 -0.897 -0.170 -0.862 -1.063 -1.388 -1.230  0.940   \n",
       "15     ...    1.935  0.466 -1.566  0.264 -0.900 -1.134 -1.537  0.049  1.681   \n",
       "16     ...    1.887  1.369 -1.133  0.450 -1.760 -0.852 -2.131 -1.411  0.747   \n",
       "17     ...    1.212  0.174 -2.111  0.390 -1.760 -0.852 -2.131 -0.131  1.019   \n",
       "18     ...    0.834  0.194 -1.006  1.002 -1.760 -0.852 -2.131 -1.140  0.003   \n",
       "19     ...    0.163 -0.123 -0.342  0.913 -0.613 -0.571 -0.943 -0.891 -0.536   \n",
       "20     ...    0.131 -0.574 -0.363  0.170 -0.613 -0.548 -0.943 -0.084 -0.780   \n",
       "21     ...   -0.225 -0.564 -0.456 -0.524  3.171  2.635 -1.596  0.267 -0.123   \n",
       "22     ...   -0.405 -0.861 -0.058 -0.894  3.802  1.173 -0.943 -0.474 -0.824   \n",
       "23     ...   -0.405 -0.901 -0.467 -0.957  4.731  3.872 -0.943 -0.120  0.311   \n",
       "24     ...    0.114 -0.636 -2.632 -0.988  2.483  1.416 -0.289  1.959  1.796   \n",
       "25     ...    0.152 -0.197 -2.397 -0.907  1.107  0.385 -0.289 -1.239  1.484   \n",
       "26     ...    0.568  0.332 -0.252  0.033  0.820  0.554 -0.289 -2.565 -0.957   \n",
       "27     ...    1.095  2.050  0.700  1.204  0.534  1.416  0.310 -1.918 -1.106   \n",
       "28     ...    1.329 -0.102  0.668 -0.080  0.820  1.454  0.364  0.088 -1.030   \n",
       "29     ...    1.027 -0.285  0.079 -0.727 -0.135  0.043  0.364  2.010 -0.164   \n",
       "...    ...      ...    ...    ...    ...    ...    ...    ...    ...    ...   \n",
       "2858   ...    1.517 -2.440  0.318 -2.285 -4.627 -4.789  0.364  0.083  1.578   \n",
       "2859   ...    1.754  0.242  0.206 -0.838 -2.620 -2.821  0.720 -0.444  1.112   \n",
       "2860   ...    1.621  0.368  0.199 -0.331 -1.784 -2.001  0.720 -0.648 -0.509   \n",
       "2861   ...    1.127  0.875  0.468 -0.226 -0.116 -0.121  0.720 -0.256  0.009   \n",
       "2862   ...    0.746 -0.360  0.689 -0.475 -0.652 -0.834  0.720  1.084  1.496   \n",
       "2863   ...    0.745  0.294 -0.334 -0.425 -0.040 -2.540  0.839  0.221  1.021   \n",
       "2864   ...    0.743 -0.298 -0.171  0.606 -0.040 -2.540  0.839 -0.094  0.260   \n",
       "2865   ...    0.589  0.050 -0.228  0.186 -0.040 -0.290  0.839  0.827  1.375   \n",
       "2866   ...    0.589 -0.115 -0.529  0.036  0.056 -0.196  0.839  0.029  1.225   \n",
       "2867   ...    0.453  0.071 -0.559  0.269  0.648  0.385  0.839 -0.724 -0.377   \n",
       "2868   ...    0.139  1.830  0.194  1.350  0.304  0.160  0.839 -1.033  0.404   \n",
       "2869   ...    0.139  0.327  0.336  0.806  0.648  0.160  0.839 -0.116 -0.649   \n",
       "2870   ...   -0.206  1.327  0.325  1.484 -0.040 -0.355  0.839 -0.016 -1.318   \n",
       "2871   ...   -0.666  0.763  0.436  1.143 -0.040 -0.346  0.839  0.339 -0.517   \n",
       "2872   ...   -0.781  1.002  0.456  0.999 -0.438 -0.754  0.547  0.218 -1.319   \n",
       "2873   ...   -1.351  1.452  0.352  0.809 -0.470 -0.726  0.423  0.215  0.158   \n",
       "2874   ...   -1.249 -0.202  0.396 -0.064  0.304  0.160  0.364 -0.303 -0.439   \n",
       "2875   ...   -1.453  1.036  0.381  1.993  0.304 -0.065 -0.156  0.372  0.257   \n",
       "2876   ...   -1.475  0.195  0.381  0.646  0.304  0.273 -0.230 -0.207 -0.112   \n",
       "2877   ...   -1.423  0.730  0.487  0.368  0.017 -0.290 -0.349  0.177 -0.537   \n",
       "2878   ...   -1.267 -0.135  0.575  0.582  0.017 -0.290 -0.349  0.051 -0.136   \n",
       "2879   ...   -1.109  0.607  0.697  1.128 -0.040 -0.290 -0.349 -0.087  0.049   \n",
       "2880   ...   -0.693  0.366  0.839  1.297 -0.040 -0.290 -0.349  0.359 -0.276   \n",
       "2881   ...   -0.174  0.644  0.839  0.485 -0.040 -0.290 -0.349 -0.038  0.149   \n",
       "2882   ...   -0.174  0.307  0.902  0.257 -0.040 -0.290 -0.349  0.407  0.230   \n",
       "2883   ...    0.128 -0.208  0.809 -0.173  0.247 -0.027 -0.349  0.576  0.686   \n",
       "2884   ...    0.291 -0.287  0.465 -0.310  0.763  0.498 -0.349 -0.615 -0.380   \n",
       "2885   ...    0.291 -0.179  0.268  0.552  0.763  0.498 -0.349  0.951  0.748   \n",
       "2886   ...    0.216  1.061 -0.051  1.023  0.878  0.610 -0.230 -0.301  0.555   \n",
       "2887   ...    0.047  0.057 -0.042  0.847  0.534 -0.009 -0.190 -0.567  0.388   \n",
       "\n",
       "      target  \n",
       "0      0.175  \n",
       "1      0.676  \n",
       "2      0.633  \n",
       "3      0.206  \n",
       "4      0.384  \n",
       "5      0.060  \n",
       "6      0.415  \n",
       "7      0.609  \n",
       "8      0.981  \n",
       "9      0.818  \n",
       "10     0.877  \n",
       "11     1.077  \n",
       "12    -1.099  \n",
       "13    -1.656  \n",
       "14    -0.615  \n",
       "15    -1.366  \n",
       "16    -0.345  \n",
       "17    -1.625  \n",
       "18    -0.735  \n",
       "19    -0.153  \n",
       "20     0.054  \n",
       "21     0.037  \n",
       "22     0.295  \n",
       "23     0.064  \n",
       "24    -2.586  \n",
       "25    -2.613  \n",
       "26    -0.073  \n",
       "27     1.273  \n",
       "28     1.849  \n",
       "29     0.718  \n",
       "...      ...  \n",
       "2858  -0.258  \n",
       "2859  -0.194  \n",
       "2860   0.104  \n",
       "2861   0.418  \n",
       "2862   0.204  \n",
       "2863   0.303  \n",
       "2864   0.766  \n",
       "2865  -0.409  \n",
       "2866  -0.766  \n",
       "2867  -0.189  \n",
       "2868  -0.099  \n",
       "2869   0.012  \n",
       "2870   0.249  \n",
       "2871   0.342  \n",
       "2872   0.224  \n",
       "2873  -0.031  \n",
       "2874   0.579  \n",
       "2875   0.081  \n",
       "2876   0.539  \n",
       "2877   0.565  \n",
       "2878   0.709  \n",
       "2879   0.917  \n",
       "2880   0.682  \n",
       "2881   0.892  \n",
       "2882   0.812  \n",
       "2883   0.235  \n",
       "2884   1.042  \n",
       "2885   0.005  \n",
       "2886   0.350  \n",
       "2887   0.417  \n",
       "\n",
       "[2888 rows x 39 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import os\n",
    "from  pathlib import Path\n",
    "train_file=r\"zhengqi_train.txt\"\n",
    "test_file=r\"zhengqi_test.txt\"\n",
    "data_dir=r\"D:\\project\\tianchi\\steam_prodict\"\n",
    "\"\"\"Path(data_dir,train_file)\"\"\"\n",
    "table= pd.read_table(Path(data_dir,train_file))\n",
    "table\n",
    "# table=pd.read_excel(,\n",
    "#                          sheet_name=0 , skiprows=2,\n",
    "#                          names=[\"a\",\"b\",\"c\"], usecols=\"A:M\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "1\n",
      "2\n",
      "3\n",
      "4\n"
     ]
    }
   ],
   "source": [
    "for i in table.head().index:\n",
    "    print(i)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 类型转换 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#把所有 bool 转int\n",
    "for u in issame_pd.columns:\n",
    "    if issame_pd[u].dtype==bool:\n",
    "        issame_pd[u]=issame_pd[u].astype('int')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 选取行列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "table.iloc[:,:38].head()  # 所有行，前38列"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 添加行列  [cankao](https://blog.csdn.net/claroja/article/details/65661826)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>two</th>\n",
       "      <th>three</th>\n",
       "      <th>four</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>c</th>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>10</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>d</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   one  two  three  four\n",
       "a    0    1      2     3\n",
       "b    4    5      6     7\n",
       "c    8    9     10    11\n",
       "d   12   13     14    15"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "df=pd.DataFrame(np.arange(16).reshape((4,4)),index=['a','b','c','d'],columns=['one','two','three','four']) \n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>two</th>\n",
       "      <th>three</th>\n",
       "      <th>four</th>\n",
       "      <th>column</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>c</th>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>10</td>\n",
       "      <td>11</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>d</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "      <td>15</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>new</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    one two three four column\n",
       "a     0   1     2    3      a\n",
       "b     4   5     6    7      a\n",
       "c     8   9    10   11      a\n",
       "d    12  13    14   15      a\n",
       "new   3   3     3    3      a\n",
       "0     4   4     4    4      a"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#行\n",
    "df.loc[\"new\"]='3'\n",
    "df.loc[0]='4'\n",
    "#列\n",
    "df['column']=\"a\"\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 插入或更改一行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>c</th>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>10</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>d</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "      <td>15</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>new</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      1   2   3   4  5\n",
       "a     0   1   2   3  1\n",
       "b     4   5   6   7  2\n",
       "c     8   9  10  11  3\n",
       "d    12  13  14  15  4\n",
       "new   2   2   2   2  5"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 修改列名\n",
    "df.columns=[1,2,3,4,5]\n",
    "df\n",
    "\n",
    "#插入\n",
    "# 切割+拼接"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 表格创建和并列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0    0\n",
      "1    1\n",
      "2    2\n",
      "3    3\n",
      "4    4\n",
      "5    5\n",
      "6    6\n",
      "dtype: int64\n",
      "   0  1\n",
      "0  0  0\n",
      "1  1  1\n",
      "2  2  2\n",
      "3  3  3\n",
      "4  4  4\n",
      "5  5  5\n",
      "6  6  6\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "df1=pd.Series(range(7))\n",
    "print(df1)\n",
    "result = pd.concat([df1, df1], axis=1)\n",
    "print(result)\n",
    "saveCsv=pd.DataFrame( result)\n",
    "saveCsv.to_csv(\"tagData.csv\", index=True, sep=',')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 写数组到CSV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "import random\n",
    "import time\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "tagData=np.array(range(16)).reshape(4,4)\n",
    "#tagData=np.array([\"2\",3,\"d\"])\n",
    "saveCsv=pd.DataFrame( tagData)\n",
    "saveCsv.to_csv(\"tagData.csv\", index=True, sep=',')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 写字典数组 到csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>d1</th>\n",
       "      <th>d2</th>\n",
       "      <th>d3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>a</td>\n",
       "      <td>1.550325e+09</td>\n",
       "      <td>(112.61648455091895, 48.24510351539536)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>a</td>\n",
       "      <td>1.550326e+09</td>\n",
       "      <td>(125.63563526037134, 45.647453732492174)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>a</td>\n",
       "      <td>1.550325e+09</td>\n",
       "      <td>(113.80341203154198, 30.330302386391537)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>a</td>\n",
       "      <td>1.550325e+09</td>\n",
       "      <td>(114.83991747334863, 36.66843078397682)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>b</td>\n",
       "      <td>1.550325e+09</td>\n",
       "      <td>(110.0978111589435, 41.77628925736187)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>a</td>\n",
       "      <td>1.550325e+09</td>\n",
       "      <td>(121.28960945839927, 40.190492008877044)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>b</td>\n",
       "      <td>1.550325e+09</td>\n",
       "      <td>(111.56313691394332, 44.58197626509966)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>b</td>\n",
       "      <td>1.550326e+09</td>\n",
       "      <td>(111.94077315163997, 32.779725727490316)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>b</td>\n",
       "      <td>1.550325e+09</td>\n",
       "      <td>(124.20786448412936, 39.7568303740563)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>a</td>\n",
       "      <td>1.550326e+09</td>\n",
       "      <td>(118.77618164938188, 30.927877650662907)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  d1            d2                                        d3\n",
       "0  a  1.550325e+09   (112.61648455091895, 48.24510351539536)\n",
       "1  a  1.550326e+09  (125.63563526037134, 45.647453732492174)\n",
       "2  a  1.550325e+09  (113.80341203154198, 30.330302386391537)\n",
       "3  a  1.550325e+09   (114.83991747334863, 36.66843078397682)\n",
       "4  b  1.550325e+09    (110.0978111589435, 41.77628925736187)\n",
       "5  a  1.550325e+09  (121.28960945839927, 40.190492008877044)\n",
       "6  b  1.550325e+09   (111.56313691394332, 44.58197626509966)\n",
       "7  b  1.550326e+09  (111.94077315163997, 32.779725727490316)\n",
       "8  b  1.550325e+09    (124.20786448412936, 39.7568303740563)\n",
       "9  a  1.550326e+09  (118.77618164938188, 30.927877650662907)"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "import random\n",
    "import time\n",
    "import pandas as pd\n",
    "Len=10\n",
    "tagData=[{\"d1\":1,\"d2\":2,\"d3\":3}]\n",
    "\n",
    "dataMapD1=[random.choice(\"ab\") for i in range(Len)]\n",
    "dataMapD2=[random.uniform(time.time()-1000,time.time()+1000) for i in range(Len)]\n",
    "dataMapD3=[(random.uniform(116.403406-10,116.403406+10),random.uniform(39.914935-10,39.914935+10)) for i in range(Len)]\n",
    "tagData=({\"d1\":i,\"d2\":j,\"d3\":k} for i ,j,k in zip(dataMapD1,dataMapD2,dataMapD3))\n",
    "\n",
    "\n",
    "saveCsv=pd.DataFrame( tagData)\n",
    "saveCsv.to_csv(\"tagData.csv\", index=False, sep=',',mode=\"a\")  #mode 默认为w 所以要增加改成a\n",
    "saveCsv\n",
    "# 创建数据\n",
    "df1=saveCsv"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# groupby\n",
    "返回一个 df 对象里面是\n",
    "\n",
    "返回一个元组  0 是 group 的值  1 是df 对象的所有行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 分类求和\n",
    "df1=base_data.groupby(['d1,'d2']['',''].sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a\n",
      "  d1            d2                                        d3\n",
      "0  a  1.546831e+09  (110.47443455334906, 37.976946655571375)\n",
      "1  a  1.546831e+09  (117.35809701401953, 44.339268945341445)\n",
      "3  a  1.546831e+09   (123.6241511063321, 29.944813464705298)\n",
      "4  a  1.546830e+09  (113.65009482429744, 48.196519288305694)\n",
      "6  a  1.546831e+09   (123.83172209314667, 49.50732161311943)\n",
      "7  a  1.546830e+09   (116.4717783848038, 37.747542049089034)\n",
      "9  a  1.546831e+09   (116.44486713663488, 34.60986795139405)\n",
      "+++++++++++++++++++++++++\n",
      "len 7\n",
      "   d1            d2                                                 d3\n",
      "0  aa  3.093662e+09  (110.47443455334906, 37.976946655571375, 110.4...\n",
      "1  aa  3.093663e+09  (117.35809701401953, 44.339268945341445, 117.3...\n",
      "3  aa  3.093662e+09  (123.6241511063321, 29.944813464705298, 123.62...\n",
      "4  aa  3.093661e+09  (113.65009482429744, 48.196519288305694, 113.6...\n",
      "6  aa  3.093662e+09  (123.83172209314667, 49.50732161311943, 123.83...\n",
      "7  aa  3.093660e+09  (116.4717783848038, 37.747542049089034, 116.47...\n",
      "9  aa  3.093661e+09  (116.44486713663488, 34.60986795139405, 116.44...\n",
      "  d1            d2\n",
      "0  a  1.546831e+09\n",
      "1  a  1.546831e+09\n",
      "3  a  1.546831e+09\n",
      "7\n",
      "+++++++++++++++++++++++++\n",
      "b\n",
      "  d1            d2                                        d3\n",
      "2  b  1.546831e+09   (107.26861396143475, 47.70697641278318)\n",
      "5  b  1.546831e+09   (109.34629322675231, 36.71393760005099)\n",
      "8  b  1.546831e+09  (124.20441606260636, 42.914865961407415)\n",
      "+++++++++++++++++++++++++\n",
      "len 3\n",
      "   d1            d2                                                 d3\n",
      "2  bb  3.093662e+09  (107.26861396143475, 47.70697641278318, 107.26...\n",
      "5  bb  3.093662e+09  (109.34629322675231, 36.71393760005099, 109.34...\n",
      "8  bb  3.093663e+09  (124.20441606260636, 42.914865961407415, 124.2...\n",
      "  d1            d2\n",
      "2  b  1.546831e+09\n",
      "5  b  1.546831e+09\n",
      "8  b  1.546831e+09\n",
      "3\n",
      "+++++++++++++++++++++++++\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "grouped = df1.groupby('d1')\n",
    "# for i in grouped:\n",
    "#     print(i[0])\n",
    "# for i in grouped:\n",
    "#     print(i[1][\"d1\"])\n",
    "    \n",
    "for i,j in grouped:\n",
    "    print(i)\n",
    "    print(j)\n",
    "    print(\"+++++++++++++++++++++++++\")\n",
    "    print(\"len\",len(j))\n",
    "   # print(j+j)\n",
    "    print(j[[\"d1\",\"d2\"]][:3])\n",
    "    print(grouped.size()[i])\n",
    "    print(\"+++++++++++++++++++++++++\")\n",
    "    \n",
    "#len ( (i for i in range(10)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'d1': {0: 'a', 1: 'a', 3: 'a', 4: 'a'}, 'd2': {0: 1546830971.9024727, 1: 1546831295.3482182, 3: 1546830871.0391097, 4: 1546830269.3660083}}\n",
      "{'d1': {2: 'b', 5: 'b', 8: 'b'}, 'd2': {2: 1546831109.5617502, 5: 1546830787.821706, 8: 1546831427.975249}}\n",
      "==========\n",
      "[{'d1': 'a'}, {'d1': 'a'}, {'d1': 'a'}, {'d1': 'a'}]\n",
      "==========\n",
      "[{'d2': 1546830971.9024727}, {'d2': 1546831295.3482182}, {'d2': 1546830871.0391097}, {'d2': 1546830269.3660083}]\n",
      "==========\n",
      "[{'d1': 'b'}, {'d1': 'b'}, {'d1': 'b'}]\n",
      "==========\n",
      "[{'d2': 1546831109.5617502}, {'d2': 1546830787.821706}, {'d2': 1546831427.975249}]\n"
     ]
    }
   ],
   "source": [
    "# 数量大于n 的分组\n",
    "t=[j for i,j in grouped if grouped.size()[i] >2]\n",
    "\n",
    "t=[i[[\"d1\",\"d2\"]] [:4] for i  in t]\n",
    "#t[[\"d1\",\"d2\"]] [:4] cuowu\n",
    "for i in t :\n",
    "    print(i.to_dict())\n",
    "for i in t:\n",
    "\n",
    "    for j,k in i.items() :\n",
    "        print(\"==========\")\n",
    "        #print(j,k)\n",
    "        print( [{j:l} for l in k])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 222,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   0  1\n",
      "0  2  3\n",
      "1  3  4\n",
      "2  4  1\n",
      "3  1  3 \n",
      "===========\n",
      "   0  1\n",
      "2  4  1 \n",
      "\n",
      "   0  1\n",
      "0  2  3\n",
      "3  1  3 \n",
      "\n",
      "   0  1\n",
      "1  3  4 \n",
      "\n",
      "============\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([3, 4, 1, 3])"
      ]
     },
     "execution_count": 222,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a=[(2, 3), (3, 4), (4, 1), (1, 3)]\n",
    "a.sort(key=lambda x:x[1])\n",
    "\n",
    "random = [(2, 3), (3, 4), (4, 1), (1, 3)]\n",
    " \n",
    "grouped=pd.DataFrame(random)\n",
    "print(grouped,\"\\n===========\")\n",
    "\n",
    "grouped=grouped.groupby(1)\n",
    "for g,i in grouped:\n",
    "    print(i,'\\n')\n",
    "print(\"============\")\n",
    "l=[]\n",
    "t=(each_df[0][:1] for g,each_df in grouped)\n",
    "for i in t:\n",
    "    l+=list(i)\n",
    "\n",
    "for g,each_df in grouped:\n",
    "   l+=list(each_df[0][:1])\n",
    "import numpy as np\n",
    "np.array(random)[:,1].tolist()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 读取csv\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>d1</th>\n",
       "      <th>d2</th>\n",
       "      <th>d3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.9125409867491918</td>\n",
       "      <td>1543559382.162108</td>\n",
       "      <td>(123.67377525379733, 46.84945879931765)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.20120199889569151</td>\n",
       "      <td>1543560741.8527527</td>\n",
       "      <td>(110.7636576966396, 38.677861353844634)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.35819917782116384</td>\n",
       "      <td>1543560836.3228948</td>\n",
       "      <td>(121.33518800185773, 31.348482401326084)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.459336715845037</td>\n",
       "      <td>1543560560.200682</td>\n",
       "      <td>(108.31435841638127, 48.784513943766896)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.8448210745857367</td>\n",
       "      <td>1543561105.9062188</td>\n",
       "      <td>(111.99258513743678, 39.97270150135577)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.9148433381655829</td>\n",
       "      <td>1543559894.4326143</td>\n",
       "      <td>(119.69937265277574, 47.32751636185243)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.5633268202060597</td>\n",
       "      <td>1543559269.1755526</td>\n",
       "      <td>(120.68398382433318, 37.23511331828462)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.8957732169983896</td>\n",
       "      <td>1543559575.4414225</td>\n",
       "      <td>(124.0580411176716, 48.666463306075634)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.407338217020962</td>\n",
       "      <td>1543560087.4648385</td>\n",
       "      <td>(110.14492185361212, 47.691968704791094)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0.6265109352938901</td>\n",
       "      <td>1543560008.4113736</td>\n",
       "      <td>(112.5717673588419, 33.11247338533024)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>d1</td>\n",
       "      <td>d2</td>\n",
       "      <td>d3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.5160130750829113</td>\n",
       "      <td>1543560852.8909962</td>\n",
       "      <td>(114.01922869797099, 30.326967185332)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0.43173371283753526</td>\n",
       "      <td>1543560431.7439637</td>\n",
       "      <td>(111.40028521866361, 44.537465185669824)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>0.3398520160117585</td>\n",
       "      <td>1543560270.2508895</td>\n",
       "      <td>(121.9929394829491, 43.06986431033084)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.49472952698026756</td>\n",
       "      <td>1543560732.6628125</td>\n",
       "      <td>(114.54381519878336, 33.25648358139442)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0.8337472601525879</td>\n",
       "      <td>1543560731.0176609</td>\n",
       "      <td>(107.38787617125722, 45.051043458192396)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>0.24140995270115617</td>\n",
       "      <td>1543559915.9692078</td>\n",
       "      <td>(109.0528017871154, 40.54291511405441)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0.8867501839118266</td>\n",
       "      <td>1543559743.612194</td>\n",
       "      <td>(107.89709108721794, 37.78577730741819)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>0.474686189829152</td>\n",
       "      <td>1543559494.7214766</td>\n",
       "      <td>(118.19874737232234, 30.037273083650824)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0.9412656074388821</td>\n",
       "      <td>1543559320.4349597</td>\n",
       "      <td>(125.66381404548581, 38.50071524031779)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>0.4819513056722715</td>\n",
       "      <td>1543560722.9567559</td>\n",
       "      <td>(124.5805987035731, 42.88244301626382)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     d1                  d2  \\\n",
       "0    0.9125409867491918   1543559382.162108   \n",
       "1   0.20120199889569151  1543560741.8527527   \n",
       "2   0.35819917782116384  1543560836.3228948   \n",
       "3     0.459336715845037   1543560560.200682   \n",
       "4    0.8448210745857367  1543561105.9062188   \n",
       "5    0.9148433381655829  1543559894.4326143   \n",
       "6    0.5633268202060597  1543559269.1755526   \n",
       "7    0.8957732169983896  1543559575.4414225   \n",
       "8     0.407338217020962  1543560087.4648385   \n",
       "9    0.6265109352938901  1543560008.4113736   \n",
       "10                   d1                  d2   \n",
       "11   0.5160130750829113  1543560852.8909962   \n",
       "12  0.43173371283753526  1543560431.7439637   \n",
       "13   0.3398520160117585  1543560270.2508895   \n",
       "14  0.49472952698026756  1543560732.6628125   \n",
       "15   0.8337472601525879  1543560731.0176609   \n",
       "16  0.24140995270115617  1543559915.9692078   \n",
       "17   0.8867501839118266   1543559743.612194   \n",
       "18    0.474686189829152  1543559494.7214766   \n",
       "19   0.9412656074388821  1543559320.4349597   \n",
       "20   0.4819513056722715  1543560722.9567559   \n",
       "\n",
       "                                          d3  \n",
       "0    (123.67377525379733, 46.84945879931765)  \n",
       "1    (110.7636576966396, 38.677861353844634)  \n",
       "2   (121.33518800185773, 31.348482401326084)  \n",
       "3   (108.31435841638127, 48.784513943766896)  \n",
       "4    (111.99258513743678, 39.97270150135577)  \n",
       "5    (119.69937265277574, 47.32751636185243)  \n",
       "6    (120.68398382433318, 37.23511331828462)  \n",
       "7    (124.0580411176716, 48.666463306075634)  \n",
       "8   (110.14492185361212, 47.691968704791094)  \n",
       "9     (112.5717673588419, 33.11247338533024)  \n",
       "10                                        d3  \n",
       "11     (114.01922869797099, 30.326967185332)  \n",
       "12  (111.40028521866361, 44.537465185669824)  \n",
       "13    (121.9929394829491, 43.06986431033084)  \n",
       "14   (114.54381519878336, 33.25648358139442)  \n",
       "15  (107.38787617125722, 45.051043458192396)  \n",
       "16    (109.0528017871154, 40.54291511405441)  \n",
       "17   (107.89709108721794, 37.78577730741819)  \n",
       "18  (118.19874737232234, 30.037273083650824)  \n",
       "19   (125.66381404548581, 38.50071524031779)  \n",
       "20    (124.5805987035731, 42.88244301626382)  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#data =pd.read_csv(r\"C:\\Users\\user\\OneDrive\\code space\\python\\1notebook\\data\\tagData.csv\")\n",
    "data=pd.read_csv(\"tagData.csv\")\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "saveCsv.hand()  头几行数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 读取数据库 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "               idcard nation name sex  memo avatar     create_datetime  \\\n",
      "0  652923199002201816     汉族   王飞   男  null   None 2018-09-06 15:39:50   \n",
      "1  653122198809204416     汉族   王飞   男  null   None 2018-09-06 16:34:29   \n",
      "2  652924198910120546     汉族   王飞   女  null   None 2018-09-06 19:48:02   \n",
      "3  652324198210212818     汉族   王飞   男  null   None 2018-09-07 10:23:04   \n",
      "\n",
      "                                          image_path     id  \n",
      "0  /app/id_img/cb0/2ec/cb02ecb6-00b9-4839-9cd3-c2...  23719  \n",
      "1  /app/id_img/0a6/224/0a622493-5a6e-48bb-a1e9-fa...  27973  \n",
      "2  /app/id_img/afb/ada/afbada74-8fc2-4900-914b-ca...  37914  \n",
      "3  /app/id_img/db8/378/db8378ab-826d-44df-a6a7-58...  40541  \n"
     ]
    }
   ],
   "source": [
    "# mysql\n",
    "import pandas as pd\n",
    "import pymysql \n",
    "db = pymysql.connect(host='localhost',port=3306,user='root',passwd='123456',charset='UTF8',db='id_info_cahe_copy') \n",
    "cur = db.cursor() \n",
    "\n",
    "sql=\"\"\"SELECT\n",
    "id_info.idcard,\n",
    "id_info.nation,\n",
    "id_info.`name`,\n",
    "id_info.sex,\n",
    "id_info.memo,\n",
    "id_info.avatar,\n",
    "id_info.create_datetime,\n",
    "id_info.image_path,\n",
    "id_info.id\n",
    "FROM\n",
    "id_info\n",
    "WHERE\n",
    "id_info.`name` like \"王飞\" \"\"\"\n",
    "df=pd.read_sql(sql,con=db)\n",
    "cur.execute(sql)\n",
    "print(df)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 合并 查询"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'df' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-1-ef2c25a9a5d4>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;31m# 纵向合并\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mres\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mdf2\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdf3\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mignore_index\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mres\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'df' is not defined"
     ]
    }
   ],
   "source": [
    "# 纵向合并 \n",
    "\n",
    "res = df.append([df2, df3], ignore_index=True)\n",
    "print(res)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "               idcard                                         image_path\n",
      "0  652923199002201816  /app/id_img/cb0/2ec/cb02ecb6-00b9-4839-9cd3-c2...\n",
      "1  653122198809204416  /app/id_img/0a6/224/0a622493-5a6e-48bb-a1e9-fa...\n",
      "2  652924198910120546  /app/id_img/afb/ada/afbada74-8fc2-4900-914b-ca...\n",
      "3  652324198210212818  /app/id_img/db8/378/db8378ab-826d-44df-a6a7-58...\n",
      "  nation name\n",
      "0     汉族   王飞\n",
      "1     汉族   王飞\n",
      "2     汉族   王飞\n",
      "3     汉族   王飞\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([['652923199002201816', '汉族', '王飞', '男', 'null', None,\n",
       "        Timestamp('2018-09-06 15:39:50'),\n",
       "        '/app/id_img/cb0/2ec/cb02ecb6-00b9-4839-9cd3-c29df9d1ae63.jpg',\n",
       "        23719],\n",
       "       ['653122198809204416', '汉族', '王飞', '男', 'null', None,\n",
       "        Timestamp('2018-09-06 16:34:29'),\n",
       "        '/app/id_img/0a6/224/0a622493-5a6e-48bb-a1e9-fa81983f6ad2.jpg',\n",
       "        27973],\n",
       "       ['652924198910120546', '汉族', '王飞', '女', 'null', None,\n",
       "        Timestamp('2018-09-06 19:48:02'),\n",
       "        '/app/id_img/afb/ada/afbada74-8fc2-4900-914b-cac377fea242.jpg',\n",
       "        37914],\n",
       "       ['652324198210212818', '汉族', '王飞', '男', 'null', None,\n",
       "        Timestamp('2018-09-07 10:23:04'),\n",
       "        '/app/id_img/db8/378/db8378ab-826d-44df-a6a7-58b5520d6617.jpg',\n",
       "        40541]], dtype=object)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#表格操作，\n",
    "\n",
    "# 知道列名 使用df.loc\n",
    "print( df.loc[:,[\"idcard\",\"image_path\"]])\n",
    "#不知道列名 使用  df.iloc\n",
    "print( df.iloc[:,[1,2]])\n",
    "\n",
    "# pd转num array\n",
    "print(df.values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('21412',)\n",
      "('3',)\n",
      "(None,)\n"
     ]
    }
   ],
   "source": [
    "import pymysql\n",
    "database={\n",
    "            # 本地配置\n",
    "            'USER': 'root',\n",
    "            'PASSWORD': '123456',\n",
    "            'HOST': \"localhost\",\n",
    "            'ENGINE': 'django.db.backends.mysql',\n",
    "            'NAME': \"test\",\n",
    "            'PORT':3306\n",
    "        }\n",
    "\n",
    "\n",
    "db=pymysql.connect(database[\"HOST\"], database[\"USER\"], database[\"PASSWORD\"], database[\"NAME\"],\n",
    "                                  port=int(database[\"PORT\"]))\n",
    "id=(\"111\",\"1234\")\n",
    "uri=\"2222saffa\"\n",
    "i=124\n",
    "sql = f\"INSERT INTO yt_id_uri(image_id, uri,a)VALUES ('{id}','{uri}',{i})\"  \n",
    "\n",
    "sql = f\"DELETE FROM yt_id_uri WHERE image_id='{id}'\"\n",
    "sql = f\"SELECT uri FROM yt_id_uri WHERE image_id in ('111','1234','223')\"\n",
    "sql = f\"SELECT uri FROM yt_id_uri WHERE image_id in {id}\"\n",
    "cur = db.cursor()\n",
    "cur.execute(sql)\n",
    "\n",
    "r=cur.fetchone()\n",
    "rr=cur.fetchall()\n",
    "\n",
    "db.commit()\n",
    "for i in rr:\n",
    "    print(i)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
